package name.sraynal.msgdispatcher.view;

import javax.microedition.lcdui.Displayable;
import javax.microedition.lcdui.Screen;

import name.sraynal.msgdispatcher.controller.Controller;
import name.sraynal.msgdispatcher.event.Event;

public abstract class View {
	
	protected Controller[] controllers;
	protected Displayable displayable;
	
	public View(Controller[] controllers) {
		this.controllers = controllers;
	}
	
	protected final void sendEvent(Event event) {
		for (int i = 0;i < controllers.length; i++) {
			this.controllers[i].sendEvent(event);
		}
	}

	public Displayable getDisplayable() {
		return displayable;
	}

}
